<script setup>
import {inject} from 'vue'
import router from '@/router'
import UserCenterPersonal from '@/components/UserCenter/personal/UserCenterPersonal.vue'
import UserCenterTalent from '@/components/UserCenter/talent/UserCenterTalent.vue'
import UserCenterOrganization from '@/components/UserCenter/organization/UserCenterOrganization.vue'

//登录相关逻辑
const userinfo=inject("userinfo")
if(!userinfo.value){
    //若没有登录，无法访问用户中心
    router.push('/')
}

</script>

<template>
<el-tabs type="border-card" v-if="userinfo">
    <el-tab-pane label="个人信息">
        <UserCenterPersonal/>
    </el-tab-pane>
    <el-tab-pane label="专家信息">
        <UserCenterTalent/>
    </el-tab-pane>
    <el-tab-pane label="机构信息">
        <UserCenterOrganization/>
    </el-tab-pane>
</el-tabs>
</template>

<style scoped>
.el-row{
    margin:10px 0;
    min-height:35px;
}
.title{
    font-weight:bolder;
    text-align:justify;
    text-align-last:justify;
}
.content,
.content-waiting,
.content-rejected{
    word-wrap:break-word;
}
.content-waiting{
    color:var(--el-color-warning);
    margin:10px 0;
}
.content-rejected{
    color:var(--el-color-error);
    margin:10px 0;
}
  
.operations{
    padding-top:10px;
    padding-bottom:10px;
    width:100%;
    text-align: center;
    background-color:whitesmoke;
}
</style>